package es.ats.codington.festival.mappers;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import es.ats.codington.festival.domain.Visitor;


public class PeopleMapper implements RowMapper<Visitor>{

	@Override
	public Visitor mapRow(ResultSet resultSet, int numRow) throws SQLException {
		Visitor visitor = new Visitor();
		
		visitor.setFirstName(resultSet.getString("firstName"));
		
		visitor.setLastName(resultSet.getString("lastName"));
		
		visitor.setEmail(resultSet.getString("email"));
		
		visitor.setPhone(resultSet.getLong("phone"));
		
		visitor.setAddress(resultSet.getString("address"));
		
		visitor.setDni(resultSet.getString("dni"));
		
		
			

			
		return visitor;
	}

}
